﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using System.Windows.Media.Imaging;

namespace MuseumQuiz
{
    public partial class GameTest01 : Page
    {
        public GameTest01()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            MuseumService.MuseumQuizServiceClient client = new MuseumService.MuseumQuizServiceClient();
            client.Get3RandomQuestionsCompleted += new EventHandler<MuseumService.Get3RandomQuestionsCompletedEventArgs>(client_get3RandomQuestionsCompleted);
        }

        void client_get3RandomQuestionsCompleted(object sender, MuseumService.Get3RandomQuestionsCompletedEventArgs e)
        {
            //List<MuseumService.QuizVragen> devragen = new List<MuseumService.QuizVragen>();
            //devragen = e.Result.ToList();

            image1.Source = new BitmapImage(new Uri(e.Result[0].vraagFotoLink));
            image2.Source = new BitmapImage(new Uri(e.Result[1].vraagFotoLink));
            image3.Source = new BitmapImage(new Uri(e.Result[2].vraagFotoLink));
        }

    }
}
